package com.zlx.controller;

import com.zlx.entity.Emp;
import com.zlx.entity.Result;
import com.zlx.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("goods")
public class EmpController {
    @Autowired
    EmpService empService;
    @PostMapping("list")
    public Result list(@RequestBody Emp emp){
        List<Emp> list = empService.list();
        return Result.success(list);
    }
}
